One idiosyncrasy that I found maddening ... to successfully bind the data source you need to specify as a simple binding. As such, this works fine
<xp:this.value><![CDATA[#{document1[compositeData.fieldName]}]]></xp:this.value>
Whereas this does not
<xp:this.value><![CDATA[#{javascript:document1[compositeData.fieldName]}]]></xp:this.value>